home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 4 / Mac Giga-ROM 4.0 - 1993.toast / FILES / HYP / T-Z / X-Tools1.1 / card_8430.txt < prev    next >
Text File  |  1989-02-26  |  2KB  |  98 lines

  1. -- card: 8430 from stack: in.1
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 3468
  5. -- name: 
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: 2000
  11. -- rect: left=331 top=317 right=340 bottom=355
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 1015 / 1015
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: New Button
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   show card field about
  23. end mouseUp
  24.  
  25.  
  26.  
  27. -- part 2 (field)
  28. -- low flags: 81
  29. -- high flags: 0004
  30. -- rect: left=193 top=166 right=266 bottom=369
  31. -- title width / last selected line: 0
  32. -- icon id / first selected line: 0 / 0
  33. -- text alignment: 0
  34. -- font id: 3
  35. -- text size: 9
  36. -- style flags: 256
  37. -- line height: 12
  38. -- part name: about
  39. ----- HyperTalk script -----
  40. on mouseUp
  41.   hide card field about
  42. end mouseUp
  43.  
  44.  
  45.  
  46. -- part contents for background part 2
  47. ----- text -----
  48. Putfile
  49.  
  50. -- part contents for background part 4
  51. ----- text -----
  52. Putfile(<prompt>,<filename>)
  53.  
  54.  
  55. -- part contents for background part 9
  56. ----- text -----
  57. XFCN
  58.  
  59. -- part contents for background part 1
  60. ----- text -----
  61. Putfile (<prompt>,<filename>)
  62.  
  63. <prompt> - this is wording in the dialog box to prompt the user to type in a filename
  64.         (e.g., "Save file as:")
  65. <filename> - this is the name of the text file created or replaced, and is placed into a 
  66.         field in the dialog box as a default file name.  
  67.  
  68. This XFCN creates a text file in which to write (save) text from fields in cards and backgrounds. The XFCN returns a dialog box for the user to choose a name for the destination text file. The value returned by the XFCN is the name of the file choosen by the user.
  69. --------
  70. ex.  Saving the contents of a card to a text file
  71.  
  72. on mouseUp
  73.   put the short name of this card & .txt. into tfilename
  74.   Get PutFile("Save text as:", tfilename)
  75.   if it is empty then exit mouseUp
  76.   put it into textfile
  77.   open file textfile
  78.   write field header to file textfile
  79.   write return to file textfile
  80.   write field mainbody to file textfile
  81.   close file textfile
  82. end mouseUp
  83.  
  84.  
  85. -- part contents for background part 8
  86. ----- text -----
  87. Frank Patrick
  88.  
  89. -- part contents for card part 2
  90. ----- text -----
  91.  
  92. Courtesy of XrefText5, XrefMerge shareware ($7.50).
  93.  
  94. Frank Patrick
  95. 721 East Brookside Lane
  96. Somerville, NJ 08876
  97.  
  98.